const { log } = require('console');
const http=require('http')
const hostname= '127.0.0.1';
const port = 3000;

var sever = http.createServer((req,res)=>{
    res.statusCode = 200;
    res.setHeader = ('Content-Type','text/plain');
    res.write('hello world');
    res.end();
});
 
sever.listen(port, hostname,()=>{
    console.log("服务器已启动");
    
})